Spatially Aware Dynamic Range Control System With Priority

ABSTRACT

An audio signal is limited in an audio coordinate system using gain factors applied in another audio coordinate system. A first component and a second component in a first audio coordinate system is generated from a third component and a fourth component of the audio signal in a second audio coordinate system. An amplitude threshold defining a maximum level for each of the third component and the fourth component is determined. One or more gain factors are applied to each of the third component and the fourth component to generate an adjusted third component and an adjusted fourth component, and a first output channel and a second output channel in the second audio coordinate system are generated from the adjusted third and fourth components. The first and second output channels are each limited below the amplitude threshold from application of the one or more gain factors.

CROSS REFERENCE TO RELATED APPLICATION

This application claims the benefit of U.S. Provisional Application No.62/599,601, filed Dec. 15, 2017, which is incorporated by reference inits entirety.

TECHNICAL FIELD

The subject matter described herein relates to audio processing, andmore particularly to dynamic range control of an audio signal in aspatially-aware context.

BACKGROUND

Range control refers to limiting of an audio signal below a thresholdamount. For a stereo audio signal in left-right space including a leftchannel and right channel, range control can be achieved in theleft-right space by applying gains to the left and right channels asneeded so that the peak of each channel is below the threshold. However,it is desirable to shift artifacts of range control to different spatiallocations.

SUMMARY

Embodiments relate to providing range control of an audio signal in aspatially-aware context. The audio signal is limited in an audiocoordinate system (e.g., left-right space) using gain factors applied inanother audio coordinate system (e.g., mid-side space) to shiftartifacts of hard limiting to different spatial locations. A first(e.g., mid) component and a second (e.g., side) component is generatedfrom a third component (e.g., a left channel) and a fourth component(e.g., a right channel) of the audio signal. An amplitude threshold inthe second audio coordinate system defining a maximum level for each ofthe third component and the fourth component is determined. One or moregain factors are applied to each of the first component and the secondcomponent to generate an adjusted first component and an adjusted secondcomponent in the first audio coordinate system. A first (e.g., left)output channel and a second (e.g., right) output channel in the secondaudio coordinate system are generated from the adjusted first componentand adjusted second component. The first and second output channels areeach limited below the amplitude threshold from the one or more gainfactors applied to each of the first component and the second component.

In some embodiments, a non-transitory computer readable medium storingprogram code that when executed by a processor configures the processorto: generate a first component and a second component in a first audiocoordinate system from a third component and a fourth component of anaudio signal in a second audio coordinate system; determine an amplitudethreshold in the second audio coordinate system defining a maximum levelfor each of the third component and the fourth component; apply one ormore gain factors to each of the first component and the secondcomponent to generate an adjusted first component and an adjusted secondcomponent in the first audio coordinate system; and generate a firstoutput channel and a second output channel in the second audiocoordinate system from the adjusted first component and the adjustedsecond component. The first and second output channels are each limitedbelow the amplitude threshold from the one or more gain factors appliedto each of the first component and the second component.

In some embodiments, a system for processing an audio signal includesprocessing circuitry configured to: generate a first component and asecond component in a first audio coordinate system from a thirdcomponent and a fourth component of an audio signal in the second audiocoordinate system; determine an amplitude threshold in the second audiocoordinate system defining a maximum level for each of the third and thefourth component; apply one or more gain factors to each of the firstcomponent and the second component to generate an adjusted firstcomponent and an adjusted second component in the first audio coordinatesystem; and generate a first output channel and a second output channelin the second audio coordinate system from the adjusted first componentand the adjusted second component. The first and second output channelsin combination are each limited below the amplitude threshold from theone or more gain factors applied to each of the first component and thesecond component.

Other aspects include components, devices, systems, improvements,methods, processes, applications, computer readable mediums, and othertechnologies related to any of the above.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic block diagram of an audio processing system, inaccordance with some embodiments.

FIG. 2 is a schematic block diagram of a spatial limiter, in accordancewith some embodiments.

FIG. 3A is a block diagram of a side channel gain application followedby a L/R gain application, in accordance with some embodiments.

FIG. 3B is a block diagram of a mid channel gain application followed bya L/R gain application, in accordance with some embodiments.

FIG. 4 is a block diagram of a mid channel gain application and a sidechannel gain application in parallel, followed by an L/R gainapplication, in accordance with some embodiments.

FIG. 5A is a block diagram of a side channel gain application, followedby a mid channel gain application, followed by a L/R gain application,in accordance with some embodiments.

FIG. 5B is a block diagram of a mid channel gain application, followedby a side channel gain application, followed by an L/R gain application,in accordance with some embodiments.

FIG. 6 is a flow chart of a method for spatially limiting an audiosignal, in accordance with some embodiments.

FIG. 7 is a flow chart of a process for spatially limiting an audiosignal using side (or mid) limiting followed by left-right limiting, inaccordance with some embodiments.

FIG. 8 is a flow chart of a process for spatially limiting an audiosignal using parallel side and mid limiting followed by left-rightlimiting, in accordance with some embodiments.

FIG. 9 is a flow chart of a process for spatially limiting an audiosignal using serial side, mid, and left-right limiting, in accordancewith some embodiments.

FIG. 10 is a flow chart of a process for controlling audio signalcomponents in one audio coordinate system to achieve a constraintdefined in another audio coordinate system, in accordance with someembodiments.

FIG. 11 is a schematic block diagram of a spatial limiter for side chainprocessing, in accordance with some embodiments.

FIG. 12 is a schematic block diagram of a computer system, in accordancewith some embodiments.

The figures depict, and the detail description describes, variousnon-limiting embodiments for purposes of illustration only.

DETAILED DESCRIPTION

Reference will now be made in detail to embodiments, examples of whichare illustrated in the accompanying drawings. In the following detaileddescription, numerous specific details are set forth in order to providea thorough understanding of the various described embodiments. However,the described embodiments may be practiced without these specificdetails. In other instances, well-known methods, procedures, components,circuits, and networks have not been described in detail so as not tounnecessarily obscure aspects of the embodiments.

Embodiments of the present disclosure relate to range control of anaudio signal in left-right space using gain factors applied in mid-sidespace. The audio signal including a left channel and a right channel areconverted to a mid component and a side component. Gain factors areapplied to each of the mid component and the side component to generatean adjusted mid component and an adjusted side component. The adjustedcomponents are converted back to left-right space into a left outputchannel and a right output channel that each satisfies a left-rightthreshold in left-right space.

The gain factors may be defined according to a priority of spatiallimiting between the mid and side components. The priority of spatiallimiting may be adjustable, and defines a desired shifting of artifactsinto different spatial locations to satisfy the left-right threshold. Again factor for a lower priority component may be defined using a gainfactor for the higher priority component so that the gain factor for thelower priority component is applied only when a gain reduction budget ofthe higher priority component has been reached without satisfaction ofthe left-right threshold. As such, the left-right threshold is satisfiedfor each of the left and right output channels according to the priorityof spatial limiting between the mid and side components.

Example Audio Processing System

FIG. 1 is a schematic block diagram of an audio processing system 100,in accordance with some embodiments. The audio processing system 100receives an input audio signal including a left input channel 112 and aright input channel 114, and gain adjusts a mid component 116 or a sidecomponent 118 of the channels 112, 114 to generate an output audiosignal including a left output channel 132 and a right output channel134 each having peaks that are limited below a left-right thresholdϑ_(LR). The audio processing system 100 provides for dynamic rangecontrol of the input audio signal in a spatially-aware context. Theaudio processing system 100 can shift the artifacts of hard limitinginto different spatial locations (e.g., mid or side components of theinput audio signal) depending on where the input energy is focused, andsettings that configure the operation of the audio processing system100. The settings may be determined programmatically, or may bespecified by a user.

The audio processing system 100 includes an L/R to M/S converter 102, aspatial limiter 104, an L/R limiter 106, an M/S to L/R converter 108,and a controller 110. The L/R to M/S converter 102 receives the leftinput channel 112 and the right input channel 114, and generates the midcomponent 116 and the side component 118 from the input channels 112,114. In some embodiments, the mid component 116 may be generated basedon a sum of the left input channel 112 and the right input channel 114.The side component 118 may be generated based on a difference betweenthe left input channel 112 and the right input channel 114. The mid andside components may be generated in other ways, such as using variousL/R to M/S transformations. In some embodiments, mid and side componentsare generated from a multichannel (e.g., surround sound) audio signal.

The spatial limiter 104 includes a mid gain processor 152 and a sidegain processor 154. The mid gain processor 152 receives the midcomponent 116 and the side component 118, and determines a mid gainfactor α_(m) for the mid component 116. The mid gain processor 152applies the mid gain factor α_(m) to the mid component 116 to generatean adjusted mid component 120. The side gain processor 154 receives themid component 116 and the side component 118, and determines a side gainfactor α_(s) for the side component 118. The side gain processor 154applies the side gain factor α_(s) to the side component 118 to generatean adjusted side component 122.

In some embodiments, there is a priority of spatial limiting between themid component 116 and the side component 118. For example, a primarygain factor α₁ is applied to the higher priority component down to again reduction budget for the higher priority component. If the gainreduction budget is exhausted, but the left-right threshold ϑ_(LR) failsto be satisfied, then a secondary gain factor α_(II) is applied to thelower priority component down to a gain reduction budget for the lowerpriority component. If the primary component is the mid component andthe secondary component is the side component, then the mid gain factorα_(m) is defined by α_(I) and the side gain factor α_(s) is defined byα_(II). If the primary component is the side component and the secondarycomponent is the mid component, then the mid gain factor α_(m) isdefined by α_(II) and the side gain factor α_(s) is defined by α_(I).The gain factor for the lower priority component is defined recursivelyusing the gain factor for the higher priority component to specify thepriority. If the left-right threshold ϑ_(LR) remains unsatisfied afterapplication of the gain factor for the lower priority component, then aleft-right gain factor α_(lr) is applied to each of the mid and sidecomponents as needed to satisfy the left-right threshold ϑ_(LR).

The L/R limiter 106 includes an L/R gain processor 156. The L/R gainprocessor 156 receives the adjusted mid component 120 and the adjustedside component 122 as adjusted by the spatial limiter 104, applies theleft-right gain factor α_(lr) to the adjusted mid component 120 togenerate the adjusted mid component 124, and applies the left-right gainfactor α_(lr) to the side component 122 to generate the adjusted sidecomponent 126.

As discussed in greater detail below in connection with FIGS. 3A through9, the gain factors α_(m), α_(s), and α_(lr) may vary depending on thepriority of spatial limiting of the audio processing system 100. Thepriority for spatial limiting defines a priority between the mid andside limiting stages. If either the mid or side gain reductioncalculations are constrained, e.g. with gain budgets or side chainprocessing, they may be followed by a L/R limiting stage that is appliedto both the mid and side components. This L/R limiting stage affectsboth components equally and therefore may be determined and applied inmid-side space or in the left-right space. Lower prioritized limitingstages may apply a gain factor that is defined using one or more gainfactors applied in higher prioritized limiting stages. Each higherpriority limiting stage may include a gain reduction budget θ thatdefines a minimum value for the gain factor, with lower prioritylimiting stages being used when the gain reduction budget is exhaustedfor the higher priority limiting stage and the left-right thresholdϑ_(LR) fails to be satisfied. In each configuration, there isapplication of at least one gain factor to the mid component and atleast one gain factor to the side component to ensure that peaks of theleft channel 132 and right channel 134 of the output audio signal inleft-right space are below the left-right threshold ϑ_(LR). It should benoted that these stages may not actually separate, nor are theynecessarily recursive in nature. The separate stages may merelyrepresent logical priority. The embodiments discussed herein are notlimited to use or omission of recursive gain stage calculations, oroperation via separate dynamic range controllers for each stage.

The M/S to L/R converter 108 receives the adjusted mid component 124 andthe adjusted side component 126, and generates the left output channel132 and the right output channel 134 from the adjusted mid component 124and the adjusted side component 126. In some embodiments, the leftoutput channel 132 may be generated based on a sum of the adjusted midcomponent 124 and the adjusted side component 126. The right outputchannel 134 may be generated based on a difference between the adjustedmid component 124 and the adjusted side component 126. Other types oftransformations may be used to generate left and right channels from midand side components. The M/S to L/R converter 108 outputs the leftoutput channel 132 to a left speaker and the right output channel 134 toa right speaker. As a result of the processing applied by the spatiallimiter 104 and the L/R limiter 106, the peaks of the left channel 132and right channel 134 of the output audio signal are below theleft-right threshold ϑ_(LR).

In some embodiments, the controller 110 controls the operations of theaudio processing system 100. The controller 110 may be coupled to thespatial limiter 104 and the L/R to configure operation of the spatiallimiter 104, such as definition of thresholds (e.g., ϑ_(LR), gainreduction budgets, etc.), determination of priority of processingstages, and determination of gain factors in accordance with thedetermined priority and thresholds. The various parameters used by thespatial limiter may be defined by user input, programmatically, orcombinations thereof as discussed in greater detail herein.

Example Spatial Limiter

FIG. 2 is a schematic block diagram of a spatial limiter 200, inaccordance with some embodiments. The spatial limiter 200 includes a midpeak extractor 202, a side peak extractor 204, a mid gain processor 206,a side gain processor 208, a mid mixer 210, and a side mixer 212.

The mid peak extractor 202 receives the mid component 116, anddetermines a mid peak 214 representing a peak value of the mid component116. The mid peak extractor 202 provides the mid peak 214 to the midgain processor 206 and the side gain processor 208. The side peakextractor 204 receives the side component 118, and determines a sidepeak 216 representing a peak value of the side component 118. The sidepeak extractor 204 provides the side peak 216 to the mid gain processor206 and the side gain processor 208.

The mid gain processor 206 determines a mid gain factor 218 (α_(m))based on the mid peak 214, the side peak 216, the threshold ϑ_(LR) inleft-right space. The side gain processor 208 determines a side gainfactor 220 (α_(s)) based on the mid peak 214, the side peak 216, thethreshold ϑ_(LR) in left-right space.

The mid mixer 210 receives the mid component 116 and the mid gain factor218 (α_(m)), and multiplies these values to generate the adjusted midcomponent 120. The side mixer 212 receives the side component 118 andthe side gain factor 220 (α_(s)), and multiplies these values togenerate the adjusted side component 122.

In some embodiments, the L/R limiting stage is integrated with thespatial limiter 200. The mid gain processor 206 combines the left-rightgain factor α_(lr) with the mid gain factor 218, and mid mixer 210multiplies the result with the mid component 116 to generate theadjusted mid component 124. The side gain processor 208 combines theleft-right gain factor α_(lr) with the side gain factor 220, and sidemixer 212 multiplies the result with the side component 118 to generatethe adjusted side component 126.

Left-Right Space to Mid-Side Space Coordinate Transformation

Gain application may be applied to one of the mid component 116 or theside component 118 of the input audio signal. To create the midcomponent 116 and side component 118, a transformation M for convertinga signal from left-right space to mid-side space may be defined byEquation 1:

$\begin{matrix}{M = {\begin{bmatrix}1 & 1 \\1 & {- 1}\end{bmatrix}\frac{1}{2}}} & {{Eq}.\mspace{14mu} (1)}\end{matrix}$

In mid-side space, various processing may be performed including subbandspatial processing, crosstalk processing (e.g., crosstalk cancellationor crosstalk simulation), crosstalk compensation (e.g., adjusting forspectral artifacts caused by crosstalk processing), and gain applicationin the mid or side components. Processed mid and side components areconverted to the left-right space as a left output channel for a leftspeaker and a right output channel for a right speaker.

The inverse transformation M⁻¹ for converting a signal from mid-sidespace to left-right space may be defined by Equation 2:

$\begin{matrix}{M^{- 1} = \begin{bmatrix}1 & 1 \\1 & {- 1}\end{bmatrix}} & {{Eq}.\mspace{14mu} (2)}\end{matrix}$

The left-right space and mid-side space are examples of orthogonal audiocoordinate systems. In practice, equations 1 and 2 may be preferred tothe true orthogonal form, where both forward and inverse transformationsare scaled by square root of 2 for reduction in computationalcomplexity.

Side (or Mid) to Left-Right Priority Limiting

An audio processing system 100 may perform spatial priority limiting ofan audio signal by prioritizing a gain applied to one of the sidecomponent m₂ or mid component m₁, followed by an L/R gain. For example,a left-right threshold ϑ_(LR) in left-right space is determined thatdefines a threshold level for the audio signal in left-right space. Theleft output channel 132 and the right output channel 134 each should notexceed the threshold ϑ_(LR). To satisfy the threshold ϑ_(LR), the audioprocessing system may prioritize gain in the mid-side space between themid or side component.

To minimize the reduction of the side component, a gain reduction budgetθ_(s) for the side component may be used. The gain reduction budgetθ_(s) defines a maximum amount of gain reduction that can be applied tothe side component, and is used to determine a gain factor α_(s) for theside component. A left-right gain factor α_(lr) is determined based onthe gain factor α_(s). Application of the side gain factor α_(s) to theside component, and a left-right gain factor α_(lr) to both the mid andside component results in satisfaction of the threshold ϑ_(LR) for theaudio signal.

After the determination of the gain factor α_(s), α_(s) is applied tothe side component. The left-right gain factor α_(lr) is applied to eachof the mid component and the side component (or each of the left andright channel after conversion to left-right space, since the sameglobal scale factor could be applied to any orthogonal rotation ofcoordinates with the identical result). Here, there is a prioritizationof gain control for the side component to satisfy the threshold ϑ_(LR)down to the side gain reduction budget θ_(s). If the gain reductionbudget θ_(s) is applied to the side component but the threshold ϑ_(LR)fails to be satisfied, then the suitable α_(lr) is applied to both themid component and side component. This results in satisfaction of thethreshold ϑ_(LR) using gain factors determined in the mid-side space.

To prioritize gain control for the side component m₂ down to a side gainreduction budget θ_(s), the gain factor α_(s) applied to the sidecomponent m₂ can be defined by Equation 3:

$\begin{matrix}{\alpha_{s} = {\max \left( {\theta_{s},{\min \left( {\frac{\vartheta_{LR} - {m_{1}}}{m_{2}},1} \right)}} \right)}} & {{Eq}.\mspace{14mu} (3)}\end{matrix}$

where |m₁| is the peak of the mid component m₁, and |m₂| is the peak ofthe side component m₂.

The left-right gain factor α_(lr) may be defined recursively using theside gain factor α_(s). The left-right gain factor α_(lr) is defined byEquation 4:

$\begin{matrix}{\alpha_{LR} = {\min \left( {\frac{\vartheta_{LR}}{P_{LR}},1} \right)}} & {{Eq}.\mspace{14mu} (4)}\end{matrix}$

where P_(LR) is a worst-case peak in left-right space after applicationof the side gain factor α_(s) to the side component m₂.

P_(LR) may be defined by Equation 5:

$\begin{matrix}{P_{LR} = {\left\lbrack {{m_{1}}\mspace{14mu} {m_{2}}} \right\rbrack \begin{bmatrix}1 \\\alpha_{S}\end{bmatrix}}} & {{Eq}.\mspace{14mu} (5)}\end{matrix}$

Once the gain coefficients α_(s) and α_(lr) are determined, they areapplied to the mid component m₁ and the side component m₂ as shown byEquation 6:

$\begin{matrix}{m^{\prime} = {{\left\lbrack {m_{1}\mspace{14mu} m_{2}} \right\rbrack \begin{bmatrix}1 & 0 \\0 & \alpha_{S}\end{bmatrix}}\begin{bmatrix}\alpha_{lr} & 0 \\0 & \alpha_{lr}\end{bmatrix}}} & {{Eq}.\mspace{14mu} (6)}\end{matrix}$

The inverse transformation as defined by Equation 2 may then be appliedto the result of Equation 6 to produce the left output channel 132 andright output channel 134, each satisfying the left-right thresholdϑ_(LR).

Note that in Equation 3, if α_(s)=0 for a given peak, this willcompletely collapse the soundstage to mono. However, we can mitigatethis effect by specifying a non-zero value for θ_(s). There will be somecomponent of peak limiting applied to both side and mid components viaα_(lr) if the budget θ_(s) is exhausted in the side component, or thereis clipping in the mid channel.

Equations 3 through 6 imply a priority of gain reduction stages as shownin FIG. 3A, where first there is a side limiter stage 302, and then aleft-right limiter stage 304. An analogous form of processing could beapplied to the mid component m₁ as shown in FIG. 3B, where first thereis a mid limiter stage 306, and then a left-right limiter stage 304.Here, algorithmic control of the mid component is achieved using a gainreduction budget θ_(m) to define a mid gain factor α_(m), along with useof a left-right gain factor α_(lr) as needed to satisfy the thresholdϑ_(LR) after application of the mid gain factor α_(m).

To prioritize gain control for the mid component m₁ down to a mid gainreduction budget θ_(m), the mid gain factor α_(m) applied to the midcomponent m₁ can be defined by Equation 7:

$\begin{matrix}{\alpha_{m} = {\max \left( {\theta_{m},{\min \left( {\frac{\vartheta_{LR} - {m_{2}}}{m_{1}},1} \right)}} \right)}} & {{Eq}.\mspace{11mu} (7)}\end{matrix}$

where |m₁| is the peak of the mid component m₁, and |m₂| is the peak ofthe side component m₂.

The left-right gain factor α_(lr) may be defined recursively using themid gain factor α_(m). The left-right gain factor α_(lr) is defined byEquation 8:

$\begin{matrix}{\alpha_{LR} = {\min \left( {\frac{\vartheta_{LR}}{P_{LR}},1} \right)}} & {{Eq}.\mspace{14mu} (8)}\end{matrix}$

where P_(LR) is a worst-case peak in left-right space after applicationof the mid gain factor α_(m) to the side component m₁.

P_(LR) may be defined by Equation 9:

$\begin{matrix}{P_{LR} = {\left\lbrack {{m_{1}}\mspace{14mu} {m_{2}}} \right\rbrack \begin{bmatrix}\alpha_{m} \\1\end{bmatrix}}} & {{Eq}.\mspace{14mu} (9)}\end{matrix}$

Once the gain coefficients α_(m) and α_(lr) are determined, they areapplied to the mid component m₁ and the side component m₂ as shown byEquation 10:

$\begin{matrix}{m^{\prime} = {{\left\lbrack {m_{1}\mspace{14mu} m_{2}} \right\rbrack \begin{bmatrix}\alpha_{m} & 0 \\0 & 1\end{bmatrix}}\begin{bmatrix}\alpha_{lr} & 0 \\0 & \alpha_{lr}\end{bmatrix}}} & {{Eq}.\mspace{14mu} (10)}\end{matrix}$

The inverse transformation as defined by Equation 2 may then be appliedto the result of Equation 10 to produce the left output channel andright output channel, each satisfying the left-right threshold ϑ_(LR).

Parallel Mid and Side to Left-Right Priority Limiting

The audio processing system 100 may use a parallel (flat) prioritybetween the mid and side component, while still prioritizing the gaincoefficients α_(m) and α_(s) above the left-right gain factor α_(lr).The priority of gain reduction stages is shown in FIG. 4, where firstthere is a side limiter stage 402 in parallel with a mid limiter stage404, and an L/R limiter stage 406 following the parallel stages 402 and404.

In this case, a side gain reduction budget θ_(s) and a mid gainreduction budget θ_(m) are both used. The side gain factor α_(s) can bedetermined using Equation 3, and the mid gain factor α_(m) can bedetermined using Equation 7. Here, the definition for the side and midgain factors are independent because of the parallel priority for themid and side components.

The left-right gain factor α_(lr) is defined using the mid gain factorα_(m) and the side gain factor α_(s). The left-right gain factor α_(lr)is defined by the Equation 8 shown above, and where the worst-case peakP_(LR) is defined Equation 11:

$\begin{matrix}{P_{LR} = {\left\lbrack {{m_{1}}\mspace{14mu} {m_{2}}} \right\rbrack \begin{bmatrix}\alpha_{m} \\\alpha_{s}\end{bmatrix}}} & {{Eq}.\mspace{14mu} (11)}\end{matrix}$

Once the gain coefficients α_(m), α_(s), and α_(lr) are determined, theyare applied to the mid component m₁ and the side component m₂ as shownby Equation 12:

$\begin{matrix}{m^{\prime} = {{\left\lbrack {m_{1}\mspace{14mu} m_{2}} \right\rbrack \begin{bmatrix}\alpha_{m} & 0 \\0 & \alpha_{S}\end{bmatrix}}\begin{bmatrix}\alpha_{lr} & 0 \\0 & \alpha_{lr}\end{bmatrix}}} & {{Eq}.\mspace{14mu} (12)}\end{matrix}$

Note that α_(m) might be permitted in this configuration to vanish to 0to keep the output |m′|≤ϑ_(LR), assuming θ_(m)=0. This means thatalthough this additional stage has prevented the mid channel informationfrom clipping, the resulting soundstage still can reduce perceptually tomono. Providing a lower bound on α_(m), would solve this issue, butwould result in an incomplete gain reduction strategy, as our gainreduction budget is now finite, consisting of 20 log 10 (θ_(s))+20 log10 (θ_(m)). As such, the calculation and application of α_(lr) is usedto ensure satisfaction of the left-right threshold ϑ_(LR).

Serial Side, Mid, and Left-Right Priority Limiting

The audio processing system may use a series priority relationshipbetween mid and side stages, followed by the L/R limiter stage. As shownin FIG. 5A, first there is a side limiter stage 502 so that the sidecomponent m₂ is the primary component for limiting, then a mid limiterstage 504 so that the mid component m₁ is the secondary component forlimiting, then a L/R limiter stage 506. In another example shown in FIG.5B, first there is a mid limiter stage 504 so that the mid component m₁is the primary component for limiting, then a side limiter stage 502such that the side component m₂ is the secondary component for limiting,then a L/R limiter stage 506. It is noted that the stages 502, 504, and506 are not necessarily separate processing stages and may representonly logical priority. Put another way, all gain reductions may becalculated simultaneously with different gain factors being used basedon the logical priority. Recursive gain stage calculations may be usedwhen gain factors are applied in separate stages.

In either case, let m_(I) designate a primary component (either midcomponent m₁ or side component m₂) and m_(II) designate a secondarycomponent (the other one of the mid component m₁ or side component m₂).The audio processing system may determine the priority order between themid and side component, either programmatically or based on user input,with the higher priority component being designated as the primarycomponent m_(I) and the lower priority component being designated as thesecondary component m_(II).

A primary gain factor α_(I) is applied to the primary component m_(I)and a secondary gain factor α_(II) is applied to the secondary componentm_(II). The secondary gain factor α_(II) is defined recursively to theprimary gain factor α_(I) to specify the priority. This is shown byEquation 13 for the primary gain factor α_(I) and Equation 14 for thesecondary gain factor α_(II):

$\begin{matrix}{\alpha_{I} = {\max \left( {\theta_{I},{\min \left( {\frac{\vartheta_{LR} - {m_{II}}}{m_{I}},1} \right)}} \right)}} & {{Eq}.\mspace{14mu} (13)} \\{\alpha_{II} = {\max \left( {\theta_{II},{\min \left( {\frac{\vartheta_{LR} - {{m_{I}}*\alpha_{I}}}{m_{II}},1} \right)}} \right)}} & {{Eq}.\mspace{14mu} (14)}\end{matrix}$

where |m_(I)| is the peak of the primary component m_(I), |m_(II)| isthe peak of the secondary component m_(II), θ_(I) is the gain reductionbudget of the primary component m_(I), and θ_(II) is the gain reductionbudget of the secondary component m_(II).

The left-right gain factor α_(lr) may be defined recursively using themid gain factor α_(m) and the side gain factor α_(s). If the primarycomponent is the mid component and the secondary component is the sidecomponent, then the mid gain factor α_(m) is defined by α_(I) and theside gain factor α_(s) is defined by α_(II). If the primary component isthe side component and the secondary component is the mid component,then the mid gain factor α_(m) is defined by α_(II) and the side gainfactor α_(s) is defined by α₁. The left-right gain factor α_(lr) isdefined by Equation 15:

$\begin{matrix}{\alpha_{LR} = {\min \left( {\frac{\vartheta_{LR}}{P_{LR}},1} \right)}} & {{Eq}.\mspace{14mu} (15)}\end{matrix}$

where P_(LR) is defined by Equation 16:

$\begin{matrix}{P_{LR} = {\left\lbrack {{m_{1}}\mspace{14mu} {m_{2}}} \right\rbrack \begin{bmatrix}\alpha_{m} \\\alpha_{s}\end{bmatrix}}} & {{Eq}.\mspace{14mu} (16)}\end{matrix}$

Once the gain coefficients α_(m), α_(s), and α_(lr) are determined, theyare applied to the mid component m₁ and the side component m₂ as shownby Equation 17:

$\begin{matrix}{m^{\prime} = {{\left\lbrack {m_{1}\mspace{14mu} m_{2}} \right\rbrack \begin{bmatrix}\alpha_{m} & 0 \\0 & \alpha_{s}\end{bmatrix}}\begin{bmatrix}\alpha_{lr} & 0 \\0 & \alpha_{lr}\end{bmatrix}}} & {{Eq}.\mspace{14mu} (17)}\end{matrix}$

In some embodiments, the L/R limiting stage 506 is integrated with eachof the side limiting stage 502 and the mid limiting stage 504. The L/Rlimiter could use either a nontrivial gain reduction budget or sidechain processing, with the associated risk of possible overshoot. Tocontrol these cases where overshoot might become problematic, such anembodiment would require an additional L/R limiter stage at the end ofthe signal path.

Control Signal Smoothing

The gain control equations described above pertain to instantaneous gainvalues. If these values are applied sample-by-sample without smoothing,the result will effectively be controlled hard-clipping in theappropriate subspace. The resulting artifacts are essentially highfrequency modulation of the gain-control function. To reduce theseartifacts, a nonlinear low-pass filter can limit the slope of thegain-control function. In cases where a totally causal gain controlresponse is desired, the downward clamping could occur immediately, butupward movement is restricted to some maximum slope. In cases where itis possible to look ahead in a control buffer, a maximally negativedownward slope limit (determined by the lookahead length) may be appliedand still hit the target control gain at the appropriate peak value.Either variant shifts the artifacts to the transient stage of musicalsounds, where they are perceptually masked, and simultaneously reducestheir bandwidth.

Example Processes

FIG. 6 is a flow chart of a process 600 for spatially limiting an audiosignal, in accordance with some embodiments. The process 600 providesfor limiting the audio signal below a threshold ϑ_(LR) in left-rightspace by gain adjusting mid and side components of the audio signal. Theprocess 600 may have fewer or additional steps, and steps may beperformed in different orders.

An audio processing system (e.g., L/R to M/S converter 102) generates605 a mid component and a side component from an audio signal includinga left channel and a right channel. The mid component and side componentmay be determined as defined in Equation 1. The mid component and sidecomponent represent the audio signal in mid-side space, and left channeland the right channel represent the audio signal in left-right space.The mid component may include a sum of the left channel and the rightchannel. The side component may include a difference between the leftchannel and the right channel.

The audio processing system (e.g., spatial limiter 104 or controller110) determines 610 a left-right threshold. The left-right thresholdϑ_(LR) defines a maximum level that is allowed for each of the leftright channels. For example, neither the absolute value of the leftchannel nor the absolute value of the right channel should exceed theleft-right threshold ϑ_(LR). The threshold ϑ_(LR) may be defined by userinput, or programmatically. As discussed in greater detail below, gainreduction is applied to the audio signal in mid-side space to ensurethat the peaks of the left channel and the right channel are below thethreshold ϑ_(LR).

The audio processing system (e.g., spatial limiter 104 and/or L/Rlimiter 106) applies 615 one or more gain factors to each of the midcomponent and the side component to generate an adjusted mid componentand an adjusted side component. In one example, the one or more gainfactors for the mid component may include a mid gain factor that isapplied to the mid component, and an L/R gain factor that is applied toeach of the mid component and the side component. The one or more gainfactors for the side component may include a side gain factor that isapplied to the side component, and the L/R gain factor. The one or moregain factors that are used for each component may depend on a priorityof spatial limiting between the mid component and the side component,with the gain factor for the lower priority component being definedrecursively using the higher priority component. Similarly, the L/R gainfactor may be defined recursively using the gain factors for the midand/or side components. Additional details regarding gain factors fordifferent priorities for spatial limiting are discussed below inconnection with FIGS. 7, 8 and 9.

The audio processing system (e.g., M/S to L/R converter 108) generates620 a left output channel and a right output channel from the adjustedmid component and the adjusted side component. The left and right outputchannels are each limited below the left-right threshold from the one ormore gain factors applied to each of the mid component and the sidecomponent.

FIG. 7 is a flow chart of a process 700 for spatially limiting an audiosignal using side (or mid) limiting followed by left-right limiting, inaccordance with some embodiments. The process 700 may be performed atstep 615 for the process 600 to implement the priority of gain reductionstages shown in FIG. 3A or FIG. 3B. In FIG. 3A, the side component is aselected component for limiting, and the mid component is a non-selectedcomponent for limiting. In FIG. 3B, the mid component is the selectedcomponent, and the side component is the non-selected component. Theprocess 700 may have fewer or additional steps, and steps may beperformed in different orders.

The audio processing system (e.g., spatial limiter 104 or controller110) determines 705 a priority for spatial limiting between the midcomponent and the side component defining one of the mid component orthe side component as a selected component, and another one of the midcomponent or the side component as a secondary component. The priorityfor the spatial limiting may be determined programmatically, or based onuser input.

The audio processing system (e.g., spatial limiter 104 or controller110) determines 710 a gain factor for the selected component. Forexample, the gain factor may be defined by Equation 3 when the sidecomponent is the selected component, or the gain factor may be definedby Equation 7 when the mid component is the selected component. Ineither case, the gain factor is defined down to a gain reduction budgetθ.

The audio processing system (e.g., spatial limiter 104) applies 715 thegain factor for the selected component to the selected component. Theselected component may be multiplied by the gain factor.

The audio processing system (e.g., L/R limiter 106 or controller 110)determines 720 a left-right gain factor for the selected component andthe non-selected component using the gain factor for the selectedcomponent. If the selected component is the side component, then theleft-right gain factor α_(lr) may be determined using Equations 4 and 5.If the selected component is the mid component, then the left-right gainfactor α_(lr) may be determined using Equations 8 and 9.

The audio processing system (e.g., L/R limiter 106) applies 725 theleft-right gain factor to the selected component to generate an adjustedselected component and to the non-selected component to generate anadjusted non-selected component. The adjusted selected and non-selectedcomponents, one being the adjusted mid component and the other being theadjusted side component, may be used to generate the left and rightoutput channels.

FIG. 8 is a flow chart of a process 800 for spatially limiting an audiosignal using parallel side and mid limiting followed by left-rightlimiting, in accordance with some embodiments. The process 800 may beperformed at step 615 for the process 600 to implement the priority ofgain reduction stages shown in FIG. 4. The process 800 may have fewer oradditional steps, and steps may be performed in different orders.

The audio processing system (e.g., spatial limiter 104 or controller110) determines 805 a priority for spatial limiting between the midcomponent and the side component defining the mid and side components asequal priority components. The priority for the spatial limiting may bedetermined programmatically, or based on user input.

The audio processing system (e.g., spatial limiter 104 or controller110) determines 810 a mid gain factor for the mid component. Forexample, mid gain factor may be defined by Equation 7, where the midgain factor is defined down to a gain reduction budget θ_(m).

The audio processing system (e.g., spatial limiter 104) applies 815 themid gain factor to the mid component. The mid component may bemultiplied by the mid gain factor.

The audio processing system (e.g., spatial limiter 104) determines 820 aside gain factor for the side component. For example, the side gainfactor may be defined by Equation 7, where the side gain factor isdefined down to a gain reduction budget θ_(s).

The audio processing system (e.g., spatial limiter 104) applies 825 theside gain factor to the side component. The side component may bemultiplied by the side gain factor.

The audio processing system (e.g., L/R limiter 106 or controller 110)determines 830 a left-right gain factor for the mid component and theside component recursively using the mid gain factor and the side gainfactor. The left-right gain factor α_(lr) may be determined using themid gain factor α_(m) and the side gain factor α_(s) as defined byEquations 8 and 11.

The audio processing system (e.g., L/R limiter 106) applies 835 theleft-right gain factor to the mid component to generate the adjusted midcomponent and to the side component to generate the adjusted sidecomponent. The adjusted mid and side components may be used to generatethe left and right output channels.

FIG. 9 is a flow chart of a process 900 for spatially limiting an audiosignal using serial side, mid, and left-right limiting, in accordancewith some embodiments. The process 900 may be performed at step 615 forthe process 600 to implement the priority of gain reduction stages shownin FIG. 5A or FIG. 5B. In FIG. 5A, the side component is a primarycomponent for limiting having higher priority, and the mid component isa secondary component for limiting having lower priority than theprimary component. In FIG. 5B, the mid component is the primarycomponent, and the side component is the secondary component. Theprocess 900 may have fewer or additional steps, and steps may beperformed in different orders.

The audio processing system (e.g., spatial limiter 104 or controller110) determines 905 a priority for spatial limiting between the midcomponent and the side component defining one of the mid component orthe side component as a primary component, and another one of the midcomponent or the side component as a secondary component. The priorityfor the spatial limiting may be determined programmatically, or based onuser input.

The audio processing system may further determine one or more parametersfor the spatial limiting. For example, the primary gain reduction budgetθ_(I) and the secondary gain reduction budget θ_(II) may be determinedeither programmatically or from user input.

The audio processing system (e.g., mid gain processor 152 or side gainprocessor 154) determines 910 a primary gain factor for the primarycomponent. The primary gain factor α_(I) may be defined by Equation 13.Here, the peak of the primary component |m_(I)| is determined fromm_(I), and the peak of the secondary component |m_(II)| is determinedfrom m_(II). The peak of the secondary component |m_(II)| is subtractedfrom the threshold ϑ_(LR), and divided by the peak of the primarycomponent |m_(I)| to determine a result. The minimum value between theresult and 1 is determined. The primary gain factor α_(I) is determinedfrom a maximum value between the result and the primary gain reductionbudget θ_(I).

The audio processing system (e.g., the mid gain processor 152 or sidegain processor 154) applies 915 the primary gain factor to the primarycomponent. For example, the primary gain factor α_(I) may be multipliedwith the primary component m_(I).

The audio processing system (e.g., the other one of the mid gainprocessor 152 or side gain processor 154) determines 920 a secondarygain factor for the secondary component recursively using the primarygain factor. The secondary gain factor is defined using the primary gainfactor to implement the serial priority for spatial limiting between themid and side components of the audio signal.

The secondary gain factor α_(II) may be defined by Equation 14. The peakof the primary component |m_(I)| is multiplied by the primary gainfactor α_(I), and the result of the multiplication is subtracted fromthe threshold ϑ_(LR). The result of the subtraction is divided by thepeak of the primary component |m_(I)| to determine a result. The minimumvalue between the result and 1 is determined. The secondary gain factorα_(II) is determined from a maximum value between the result and thesecondary gain reduction budget θ_(II).

The audio processing system (e.g., the other one of the mid gainprocessor 152 or side gain processor 154) applies 925 the secondary gainfactor to the secondary component. For example, the secondary gainfactor au may be multiplied with the secondary component m_(II).

The audio processing system (e.g., the L/R limiter 106 or controller110) determines 930 a left-right gain factor for the primary componentand the secondary component using the primary gain factor and thesecondary gain factor. The left-right gain factor α_(lr) may be definedusing the Equations 15 and 16. In the Equation 15, the left-rightthreshold ϑ_(LR) is divided by the worst-case peak in left-right spaceP_(LR), and the left-right gain factor α_(lr) is determined as a minimumvalue between the result of the division and 1. In the Equation 16, theP_(LR) is determined by multiplying the peak of the mid component|m_(I)| by the mid gain factor α_(m), multiplying the peak of the sidecomponent |m₂| by the side gain factor α_(s), and adding the results ofthe multiplications. One of the gain factors α_(m) or α_(s) may be theprimary gain factor au, and the other one of the gain factors α_(m) orα_(s) may be the secondary gain factor au, depending on order ofpriority between the mid and side components.

The audio processing system (e.g., the L/R limiter 106) applies 935 theleft-right gain factor to the primary component to generate an adjustedprimary component, and the left-right gain factor to the secondarycomponent to generate an adjusted secondary component. For example, theleft-right gain factor α_(lr) is multiplied with the primary component(as may be modified by the spatial limiter 140) to generate the adjustedprimary component. The left-right gain factor α_(lr) is multiplied withthe secondary component (as may be modified by the spatial limiter 104)to generate the adjusted secondary component. The adjusted primary andsecondary components may be used to generate the left and right outputchannels.

FIG. 10 is a flow chart of a process 1000 for controlling audio signalcomponents in one audio coordinate system to achieve a constraintdefined in another audio coordinate system, in accordance with someembodiments. The process 1000 is a generalization of the processes 600through 900 shown in FIGS. 6 through 9, respectively, where an amplitudethreshold can be defined in either the mid-side audio coordinate systemor the left-right audio coordinate system, and gain factors are appliedto components in the other audio coordinate system to satisfy theamplitude threshold. The process 1000 may have fewer or additionalsteps, and steps may be performed in different orders.

An audio processing system generates 1005 a first component and a secondcomponent in a first audio coordinate system from a third component anda fourth component of the audio signal in a second audio coordinatesystem. In one example, the first audio coordinate system is a mid-sideaudio coordinate system, the first component is a mid component, and thesecond component is a side component. The second audio coordinate systemis the left-right audio coordinate system, the third component is a leftcomponent, and the fourth component is a right component. In anotherexample, the first audio coordinate system is left-right audiocoordinate system, the first component is a left component, and thesecond component is a right component. The second audio coordinatesystem is the mid-side audio coordinate system, the third component is amid component and the fourth component is a side component. Conversionbetween audio coordinate systems may be performed by an L/R to M/Sconverter 102 or an M/S to L/R converter 108, as shown in FIG. 1.

The audio processing system determines 1010 an amplitude threshold inthe second audio coordinate system defining a maximum level for each ofthe third component and the fourth component. If the second audiocoordinate system is the left-right audio coordinate system, then theamplitude threshold may be the L-R threshold ϑ_(LR), defining a maximumlevel for the left and right components of the audio signal. If thesecond audio coordinate system is the mid-side audio coordinate system,then the amplitude threshold may be a M-S threshold ϑ_(MS), defining amaximum level for the mid and side components of the audio signal. Asdiscussed in greater detail below, gain reduction may be applied to theaudio signal in second audio coordinate system to ensure that the peaksof the third and fourth components are below the amplitude threshold.

The audio processing system applies 1015 one or more gain factors toeach of the first component and the second component to generate anadjusted first component and an adjusted second component in the firstaudio coordinate system. The one or more gain factors may include one ormore first gain factors that are applied to the first component, and oneor more second gain factors that are applied to the second component. Insome embodiments, a side chain processing may be performed as discussedin greater detail below in connection with FIG. 1. Here, a single gainfactor is determined and applied for each of the first and secondcomponents.

In some embodiments, the one or more gain factors that are used for eachcomponent may depend on a priority of spatial limiting between the firstcomponent and the second component, with the gain factor for the lowerpriority component being defined recursively using the higher prioritycomponent. One or more of the gain factors may be constrained by a gainreduction budget. A smoothing function may be applied to reduceartifacts. In the example where the first audio coordinate system is theleft-right audio coordinate system, the gain factors may be generatedusing similar techniques as discussed herein for the gain factors in themid-side audio coordinate system.

In some embodiments, the audio processing system determines whether theamplitude threshold is satisfied from applying the one or more gainfactors to each of the first component and the second component. Forexample, some or all of the gain factors may include a gain reductionbudget. If the gain reduction budget is exhausted but the amplitudethreshold fails to be satisfied, a global gain factor (e.g., left-rightgain factor α_(lr)) may be applied to the audio signal to satisfy theamplitude threshold. The global gain factor may be applied to the firstand second components in the first coordinate system, or to the thirdand fourth components in the second coordinate system.

The audio processing system generates 1020 a first output channel and asecond output channel in the second audio coordinate system from theadjusted first component and the adjusted second component. The firstand second output channels are each limited below the amplitudethreshold from the one or more gain factors applied to each of the firstcomponent and the second component. In the example where the secondaudio coordinate system is the left-right audio coordinate system, thefirst and second output channels are left and right output channels.

Side Chain Processing

FIG. 11 is a schematic block diagram of a spatial limiter 1100 for sidechain processing, in accordance with some embodiments. The spatiallimiter 1100 integrates processing performed on the mid and sidecomponents by the various limiter stages shown in FIG. 3A, 3B, 4, 5A, or5B into a single limiting stage. In that sense, the spatial limiter 1100may be a component of the audio processing system 100 that operates withL/R to M/S converter 102 and the M/S to L/R converter 108, replacing thetwo-stage spatial limiter 104 and L/R limiter 106 shown in FIG. 1.

Side chain processing is particularly useful in cases where pumpingartifacts caused by low frequencies are present in the cross stages. Aspopular conventions in audio mixing may include centering the low (e.g.,bass) frequencies, the low frequencies of the mid component may needmore gain reduction than the low frequencies of the side component.

The spatial limiter 1100 includes a mid peak extractor 1102, a side peakextractor 1104, a mid gain processor 1106, a side gain processor 1108, amid mixer 1110, and a side mixer 1112.

The mid peak extractor 1102 receives the mid component 116, anddetermines the mid peak 214 representing a peak value of the midcomponent 116. The mid peak extractor 1102 provides the mid peak 214 tothe mid gain processor 1106 and the side gain processor 1108. The sidepeak extractor 1104 receives the side component 118, and determines aside peak 216 representing a peak value of the side component 118. Theside peak extractor 1104 provides the side peak 216 to the mid gainprocessor 1106 and the side gain processor 1108.

The mid gain processor 1106 determines a mid gain factor 1118 (α_(m))based on the mid peak 214, the side peak 216, the threshold ϑ_(LR) inleft-right space. The side gain processor 1108 determines the side gainfactor 1120 (α_(s)) based on the mid peak 214, the side peak 216, thethreshold ϑ_(LR) in left-right space.

The side chain processing may incorporate different priorities forlimiting the mid or side components based on the calculations used forthe mid gain factor α_(m) and the side gain factor α_(s). By applyingadditional side chain processing to the control signals, we may derivethe following operator matrix:

$\begin{bmatrix}{MM} & {MS} \\{SM} & {SS}\end{bmatrix}\quad$

where each entry is an independent operator. The operator matrixprovides the ability to prioritize gain control not only based onbroadband spatial characteristics, but a vast number of othercharacteristics, such as frequency content, etc. The entry MM is anoperator which defines the control of the mid gain factor α_(m) by themid component 214. MS is an operator which defines the control of theside gain factor α_(s) by the mid component 214. SM is an operator whichdefines control of the mid gain factor α_(m) by the side component 216.Finally, SS is an operator which defines control of the side gain factorα_(s) by the side component 216.

In an example where priority is implemented with side chain processing,the mid gain processor 1106 determines the mid gain factor and the sidegain processor 1108 determines the side gain factor α_(s) usingEquations 13 or 14, depending on the desired priority between the midand side limiting stages, determines the left-right gain factor is usingthe Equations 15 and 16. The mid gain processor 1106 combines the midgain factor with the left-right gain factor to generate the mid gainfactor 1118. The side gain processor 1106 combines the side gain factorwith the left-right gain factor to generate the final mid gain factor1118.

The mid mixer 1110 receives the mid component 116 and the mid gainfactor 1118 (α_(m)), and multiplies these values to generate theadjusted mid component 124. The side mixer 212 receives the sidecomponent 118 and the side gain factor 1120 (α_(s)), and multipliesthese values to generate the adjusted side component 126. The adjustedmid component 124 and adjusted side component 126 may be used togenerate a left output channel 132 and the right output channel 134,such as by the M/S to L/R converter 108 as shown in FIG. 1.

Example Computer

FIG. 12 is a schematic block diagram of a computer 1200, according toone embodiment. The computer 1200 is an example of circuitry thatimplements an audio processing system. Illustrated are at least oneprocessor 1202 coupled to a chipset 1204. The chipset 1204 includes amemory controller hub 1220 and an input/output (I/O) controller hub1222. A memory 1206 and a graphics adapter 1212 are coupled to thememory controller hub 1220, and a display device 1218 is coupled to thegraphics adapter 1212. A storage device 1208, keyboard 1210, pointingdevice 1214, and network adapter 1216 are coupled to the I/O controllerhub 1222. The computer 1200 may include various types of input or outputdevices. Other embodiments of the computer 1200 have differentarchitectures. For example, the memory 1206 is directly coupled to theprocessor 1202 in some embodiments.

The storage device 1208 includes one or more non-transitorycomputer-readable storage media such as a hard drive, compact diskread-only memory (CD-ROM), DVD, or a solid-state memory device. Thememory 1206 holds program code (comprised of one or more instructions)and data used by the processor 1202. The program code may correspond tothe processing aspects described with FIGS. 1 through 11.

The pointing device 1214 is used in combination with the keyboard 1210to input data into the computer system 1200. The graphics adapter 1212displays images and other information on the display device 1218. Insome embodiments, the display device 1218 includes a touch screencapability for receiving user input and selections. The network adapter1216 couples the computer system 1200 to a network. Some embodiments ofthe computer 1200 have different and/or other components than thoseshown in FIG. 12.

ADDITIONAL CONSIDERATIONS

Some example benefits and advantages of the disclosed configurationinclude limiting an audio signal in left-right space using gain factorsapplied in mid-side space to shift artifacts of hard limiting todifferent spatial locations, and the preferences specified by the user.Processing of mid or side components of audio signals is used in varioustypes of audio processing, and spatial priority limiting as discussedherein provides for more computationally efficient integration with suchprocessing techniques in mid/side space. These preferences arespecified, at the lowest level, as thresholds between which the limiterenters different regimes of operation. At a higher level, this can beunderstood as a trade-off between the artifacts of various soundstagedistortions and the artifacts of traditional peak limiting.

While particular embodiments and applications have been illustrated anddescribed, it is to be understood that the invention is not limited tothe precise construction and components disclosed herein and thatvarious modifications, changes and variations which will be apparent tothose skilled in the art may be made in the arrangement, operation anddetails of the method and apparatus disclosed herein without departingfrom the spirit and scope of the present disclosure.

1. A method for processing an audio signal, comprising: generating afirst component and a second component in a first audio coordinatesystem from a third component and a fourth component of the audio signalin a second audio coordinate system; determining an amplitude thresholdin the second audio coordinate system defining a maximum level for eachof the third component and the fourth component; applying one or moregain factors to each of the first component and the second component togenerate an adjusted first component and an adjusted second component inthe first audio coordinate system; and generating a first output channeland a second output channel in the second audio coordinate system fromthe adjusted first component and the adjusted second component, thefirst and second output channels each being limited below the amplitudethreshold from the one or more gain factors applied to each of the firstcomponent and the second component.
 2. The method of claim 1, whereinapplying the one or more gain factors to each of the first component andthe second component includes: determining a priority for spatiallimiting between the first component and the second component definingone of the first component or the second component as a primarycomponent, and another one of the first component or the secondcomponent as a secondary component; determining a primary gain factorfor the primary component; applying the primary gain factor to theprimary component; determining a secondary gain factor for the secondarycomponent using the primary gain factor; and applying the secondary gainfactor to the secondary component.
 3. The method of claim 1, wherein theone or more gain factors is constrained by a gain reduction budget. 4.The method of claim 1, further comprising applying a smoothing functionto the one or more gain factors.
 5. The method of claim 1, wherein: thefirst audio coordinate system is a mid-side audio coordinate system; thefirst component is a mid component; the second component is a sidecomponent; the second audio coordinate system is left-right audiocoordinate system; the third component is a left component of the audiosignal; the fourth component is a right component of the audio signal;the first output channel is a left output channel; and the second outputchannel is a right output channel.
 6. The method of claim 5, whereinapplying the one or more gain factors to each of the first component andthe second component includes: determining a priority for spatiallimiting between the mid component and the side component defining oneof the mid component or the side component as a primary component, andanother one of the mid component or the side component as a secondarycomponent; determining a primary gain factor for the primary component;applying the primary gain factor to the primary component; determining asecondary gain factor for the secondary component using the primary gainfactor; applying the secondary gain factor to the secondary component;determining a left-right gain factor for the primary component and thesecondary component using the primary gain factor and the secondary gainfactor; and applying the left-right gain factor to the primary componentto generate an adjusted primary component and to the secondary componentto generate an adjusted secondary component.
 7. A method of claim 6,wherein: the primary gain factor is defined by${\max \left( {\theta_{I},{\min \left( {\frac{\vartheta_{LR} - {m_{II}}}{m_{I}},1} \right)}} \right)};$the secondary gain factor is defined by${\max \left( {\theta_{II},{\min \left( {\frac{\vartheta_{LR} - {{m_{I}}*\alpha_{I}}}{m_{II}},1} \right)}} \right)};$α_(I) is the primary gain factor; θ_(I) is a primary gain reductionbudget for the primary component; θ_(II) is a secondary gain reductionbudget for the primary component; ϑ_(LR) is the left-right threshold;|m_(I)| is a peak of the primary component; and |m_(II)| is a peak ofthe secondary component.
 8. The method of claim 7, wherein: theleft-right gain factor is defined by${\min \left( {\frac{\vartheta_{LR}}{P_{LR}},1} \right)};$ ϑ_(LR) isthe left-right threshold; and P_(LR) is a worst-case peak of the audiosignal after application of the primary gain factor to the primarycomponent and the secondary gain factor to the secondary component. 9.The method of claim 5, wherein applying the one or more gain factors toeach of the first component and the second component includes:determining a priority for spatial limiting between the mid componentand the side component defining one of the mid component or the sidecomponent as a selected component, and another one of the mid componentor the side component as a non-selected component; determining a gainfactor for the selected component; applying the gain factor to theselected component; determining a left-right gain factor for theselected component and the non-selected component using the gain factorfor the selected component; and applying the left-right gain factor tothe selected component to generate an adjusted selected component and tothe non-selected component to generate an adjusted non-selectedcomponent.
 10. The method of claim 9, wherein: the gain factor for theselected component is defined by${\max \left( {\theta_{SS},{\min \left( {\frac{\vartheta_{LR} - {m_{n\; s}}}{m_{ss}},1} \right)}} \right)};$θ_(ss) is a gain reduction budget for the selected component; ϑ_(LR) isthe left-right threshold; |m_(ss)| is a peak of the selected component;and |m_(ns)| is a peak of the non-selected component.
 11. The method ofclaim 10, wherein: the left-right gain factor is defined by${\min \left( {\frac{\vartheta_{LR}}{P_{LR}},1} \right)};$ ϑ_(LR) isthe left-right threshold; and P_(LR) is a worst-case peak of the audiosignal after application of the gain factor to the selected component.12. The method of claim 5, wherein applying the one or more gain factorsto each of the first component and the second component includes:determining a priority for spatial limiting between the mid componentand the side component defining the mid component and the side componentas equal priority components; determining a mid gain factor for the midcomponent; applying the mid gain factor to the mid component;determining a side gain factor for the side component; applying the sidegain factor to the side component; determining a left-right gain factorfor the mid component and the side component using the mid gain factorand the side gain factor; applying the left-right gain factor to the midcomponent to generate the adjusted mid component and to the sidecomponent to generate the adjusted side component.
 13. The method ofclaim 12, wherein: the mid gain factor is defined by${\max \left( {\theta_{m},{\min \left( {\frac{\vartheta_{LR} - {m_{2}}}{m_{1}},1} \right)}} \right)};$the side gain factor is defined by${\max \left( {\theta_{s},{\min \left( {\frac{\vartheta_{LR} - {m_{1}}}{m_{2}},1} \right)}} \right)};$ϑ_(LR) is the left-right threshold; θ_(m) is a mid gain reduction budgetfor the mid component; θ_(s) is a side gain reduction budget for theside component; |m₁| is a peak of the mid component; and |m₂| is a peakof the side component.
 14. The method of claim 13, wherein: theleft-right gain factor is defined by${\min \left( {\frac{\vartheta_{LR}}{P_{LR}},1} \right)};$ ϑ_(LR) isthe left-right threshold; and P_(LR) is a worst-case peak of the audiosignal after application of the mid gain factor to the mid component andthe side gain factor to the side component.
 15. The method of claim 1,further comprising: determining whether the amplitude threshold issatisfied from applying the one or more gain factors; and in response todetermining that the amplitude threshold fails to be satisfied, applyinga global gain factor to the audio signal in the first audio coordinatesystem or the second audio coordinate system to satisfy the amplitudethreshold.
 16. A non-transitory computer readable medium storing programcode, the program code when executed by a processor configures theprocessor to: generate a first component and a second component in afirst audio coordinate system from a third component and a fourthcomponent of an audio signal in a second audio coordinate system;determine an amplitude threshold in the second audio coordinate systemdefining a maximum level for each of the third component and the fourthcomponent; apply one or more gain factors to each of the first componentand the second component to generate an adjusted first component and anadjusted second component in the first audio coordinate system; andgenerate a first output channel and a second output channel in thesecond audio coordinate system from the adjusted first component and theadjusted second component, the first and second output channels eachbeing limited below the amplitude threshold from the one or more gainfactors applied to each of the first component and the second component.17. The computer readable medium of claim 16, wherein the program codethat configures the processor to apply the one or more gain factors toeach of the first component and the second component further configuresthe processor to: determine a priority for spatial limiting between thefirst component and the second component defining one of the firstcomponent or the second component as a primary component, and anotherone of the first component or the second component as a secondarycomponent; determine a primary gain factor for the primary component;apply the primary gain factor to the primary component; determine asecondary gain factor for the secondary component using the primary gainfactor; and apply the secondary gain factor to the secondary component.18. The computer readable medium of claim 16, wherein the one or moregain factors is constrained by a gain reduction budget.
 19. The computerreadable medium of claim 16, wherein the program code further configuresthe processor to apply a smoothing function to the one or more gainfactors.
 20. The computer readable medium of claim 16, wherein: thefirst audio coordinate system is a mid-side audio coordinate system; thefirst component is a mid component; the second component is a sidecomponent; the second audio coordinate system is left-right audiocoordinate system; the third component is a left component of the audiosignal; the fourth component is a right component of the audio signal;the first output channel is a left output channel; and the second outputchannel is a right output channel.
 21. The computer readable medium ofclaim 20, wherein the program code that configures the processor toapply the one or more gain factors to each of the first component andthe second component further configures the processor to: determine apriority for spatial limiting between the mid component and the sidecomponent defining one of the mid component or the side component as aprimary component, and another one of the mid component or the sidecomponent as a secondary component; determine a primary gain factor forthe primary component; apply the primary gain factor to the primarycomponent; determine a secondary gain factor for the secondary componentusing the primary gain factor; apply the secondary gain factor to thesecondary component; determine a left-right gain factor for the primarycomponent and the secondary component using the primary gain factor andthe secondary gain factor; and apply the left-right gain factor to theprimary component to generate an adjusted primary component and to thesecondary component to generate an adjusted secondary component.
 22. Thecomputer readable medium of claim 21, wherein: the primary gain factoris defined by${\max \left( {\theta_{I},{\min \left( {\frac{\vartheta_{LR} - {m_{II}}}{m_{I}},1} \right)}} \right)};$the secondary gain factor is defined by${\max \left( {\theta_{II},{\min \left( {\frac{\vartheta_{LR} - {{m_{I}}*\alpha_{I}}}{m_{II}},1} \right)}} \right)};$α_(I) is the primary gain factor; θ_(I) is a primary gain reductionbudget for the primary component; θ_(II) is a secondary gain reductionbudget for the primary component; ϑ_(LR) is the left-right threshold;|m_(I)| is a peak of the primary component; and |m_(II)| is a peak ofthe secondary component.
 23. The computer readable medium of claim 22,wherein: the left-right gain factor is defined by${\min \left( {\frac{\vartheta_{LR}}{P_{LR}},1} \right)};$ ϑ_(LR) isthe left-right threshold; and P_(LR) is a worst-case peak of the audiosignal after application of the gain factor to the selected component.24. The computer readable medium of claim 20, wherein the program codethat configures the processor to apply the one or more gain factors toeach of the first component and the second component further configuresthe processor to: determine a priority for spatial limiting between themid component and the side component defining one of the mid componentor the side component as a selected component, and another one of themid component or the side component as a non-selected component;determine a gain factor for the selected component; apply the gainfactor to the selected component; determine a left-right gain factor forthe selected component and the non-selected component using the gainfactor; and apply the left-right gain factor to the selected componentto generate an adjusted selected component and to the non-selectedcomponent to generate an adjusted non-selected component.
 25. Thecomputer readable medium of claim 24, wherein: the gain factor for theselected component is defined by${\max \left( {\theta_{SS},{\min \left( {\frac{\vartheta_{LR} - {m_{n\; s}}}{m_{ss}},1} \right)}} \right)};$θ_(ss) is a gain reduction budget for the selected component; ϑ_(LR) isthe left-right threshold; |m_(ss)| is a peak of the selected component;and |m_(ns)| is a peak of the non-selected component.
 26. The computerreadable medium of claim 25, wherein: the left-right gain factor isdefined by ${\min \left( {\frac{\vartheta_{LR}}{P_{LR}},1} \right)};$ϑ_(LR) is the left-right threshold; and P_(LR) is a worst-case peak ofthe audio signal after application of the gain factor to the selectedcomponent.
 27. The computer readable medium of claim 20, wherein theprogram code that configures the processor to apply the one or more gainfactors to each of the first component and the second component furtherconfigures the processor to: determine a priority for spatial limitingbetween the mid component and the side component defining the midcomponent and the side component as equal priority components; determinea mid gain factor for the mid component; apply the mid gain factor tothe mid component; determine a side gain factor for the side component;apply the side gain factor to the side component; determine a left-rightgain factor for the mid component and the side component using the midgain factor and the side gain factor; and apply the left-right gainfactor to the mid component to generate an adjusted mid component and tothe side component to generate an adjusted side component.
 28. Thecomputer readable medium of claim 27, wherein: the mid gain factor isdefined by${\max \left( {\theta_{m},{\min \left( {\frac{\vartheta_{LR} - {m_{2}}}{m_{1}},1} \right)}} \right)};$the side gain factor is defined by${\max \left( {\theta_{s},{\min \left( {\frac{\vartheta_{LR} - {m_{1}}}{m_{2}},1} \right)}} \right)};$ϑ_(LR) is the left-right threshold; θ_(m) is a mid gain reduction budgetfor the mid component; θ_(s) is a side gain reduction budget for theside component; |m₁| is a peak of the mid component; and |m₂| is a peakof the side component.
 29. The computer readable medium of claim 28,wherein: the left-right gain factor is defined by${\min \left( {\frac{\vartheta_{LR}}{P_{LR}},1} \right)};$ ϑ_(LR) isthe left-right threshold; and P_(LR) is a worst-case peak of the audiosignal after application of the mid gain factor to the mid component andthe side gain factor to the side component.
 30. The computer readablemedium of claim 16, wherein the program code further configures theprocessor to: determine whether the amplitude threshold is satisfiedfrom applying the one or more gain factors; and in response todetermining that the amplitude threshold fails to be satisfied, apply aglobal gain factor to the audio signal in the first audio coordinatesystem or the second audio coordinate system to satisfy the amplitudethreshold.
 31. A system for processing an audio signal, comprising:processing circuitry configured to: generate a first component and asecond component in a first audio coordinate system from a thirdcomponent and a fourth component of an audio signal in the second audiocoordinate system; determine an amplitude threshold in the second audiocoordinate system defining a maximum level for each of the thirdcomponent and the fourth component; apply one or more gain factors toeach of the first component and the second component to generate anadjusted first component and an adjusted second component in the firstaudio coordinate system; and generate a first output channel and asecond output channel in the second audio coordinate system from theadjusted first component and the adjusted second component, the firstand second output channels each being limited below the amplitudethreshold from the one or more gain factors applied to each of the firstcomponent and the second component.